package com.gitee.hermer.engine.jars.demo.core;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.gitee.hermer.boot.jee.commons.log.Logger;
import com.gitee.hermer.boot.jee.commons.log.UtilsContext;
import com.gitee.hermer.engine.jars.core.domain.BaseInfo;
import com.gitee.hermer.engine.jars.demo.core.service.impl.TestServiceImpl;

@Controller
@RequestMapping(value="/v3/test")
public class TestController extends UtilsContext{



	@Autowired
	private TestServiceImpl testService;


//	@Autowired
//	private IdGenerateRule generateRule;

	@RequestMapping(value = {"randomString"},method = RequestMethod.GET)
	@ResponseBody
	public BaseInfo<String> ajaxInsert(){
		try{
			return new BaseInfo<String>("",testService.updateTestPO());
		}catch (Exception e) {
			error(e.getMessage(),e);
		}
		return new BaseInfo<String>("",false);
	}


//	@RequestMapping(value = {"randomId"},method = RequestMethod.GET)
//	@ResponseBody
//	public BaseInfo<String> randomId(){
//		return new BaseInfo<String>("",generateRule.generateId());
//	}

}
